package com.accp.vehiclecare.biz.lscbiz;

import com.accp.vehiclecare.dao.lscdao.LscuservehicleMapper;
import com.accp.vehiclecare.pojo.Uservehicle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


@Service
public class LscuservehicleBiz {
    @Autowired
    private LscuservehicleMapper dao;


    @Transactional(propagation = Propagation.REQUIRED)
    public int addone(Uservehicle us){
        return dao.insert(us);
    }

    @Transactional(propagation = Propagation.REQUIRED)
    public int removeone(Integer usid){
        return dao.deleteById(usid);
    }

    @Transactional(propagation = Propagation.REQUIRED)
    public int modif(Uservehicle us){
        return dao.updateById(us);
    }

    @Transactional(propagation = Propagation.SUPPORTS)
    public Uservehicle querone(Integer id){
        return dao.selectById(id);
    }
}
